{% extends 'base/base1.html' %}

{% block title %}删除图片{% endblock %}

{% block main %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h4>确认删除图片</h4>
                </div>
                <div class="card-body">
                    <div class="text-center mb-3">
                        <img src="{{ object.image.url }}" alt="{{ object.alt_text }}" style="max-width: 200px; max-height: 200px;">
                    </div>
                    <p>确定要删除这张图片吗？</p>
                    <p><strong>描述：</strong>{{ object.alt_text|default:"无描述" }}</p>
                    <p class="text-danger">此操作不可撤销！</p>
                    <form method="post">
                        {% csrf_token %}
                        <button type="submit" class="btn btn-danger">确认删除</button>
                        <a href="{% url 'main:product_images' %}" class="btn btn-secondary">取消</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}